import http from "./http";

export const deleteCategoryById = (_id) => {
    return http.requestDelete("/admin/category/" + _id);
}

export const postCategory = (category) => {
    return http.requestPost("/admin/category/", category);
}

export const putCategory = (category) => {
    return http.requestPut("/admin/category/" + category.id, category);
}

export const listCategories = () => {
    return http.requestGet("/admin/category/list");
};